@import './base.css';

/* 全局样式重置和海洋主题设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 海洋主题色彩 */
  --primary-color: #1e88e5; /* 深蓝 - 主色调 */
  --primary-light: #64b5f6;
  --primary-dark: #0d47a1;
  --secondary-color: #03a9f4; /* 亮蓝 - 次要色调 */
  --accent-color: #ff9800; /* 橙色 - 强调色 */
  --ocean-light: #e3f2fd;
  --ocean-medium: #90caf9;
  --ocean-dark: #1565c0;
  --text-primary: #263238;
  --text-secondary: #455a64;
  --text-light: #607d8b;
  --background-primary: #ffffff;
  --background-secondary: #f5f7fa;
  --background-tertiary: #eef2f6;
  --border-color: #cfd8dc;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background-tertiary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 全局链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* 全局按钮样式 */
button {
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--ocean-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 全局输入框样式 */
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* 全局卡片样式 */
.card {
  background: var(--background-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* 全局标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* 全局段落样式 */
p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 页脚样式 */
.footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 40px 0;
  margin-top: auto;
}

.footer a {
  color: var(--ocean-light);
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

/* 图片悬停效果 */
.img-hover {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.img-hover img {
  transition: transform 0.5s ease;
  width: 100%;
  height: auto;
  display: block;
}

.img-hover:hover img {
  transform: scale(1.05);
}

.img-hover .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.img-hover:hover .overlay {
  transform: translateY(0);
}

/* 轮播图样式 */
.carousel {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 50px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption h3 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: white;
}

.carousel-caption p {
  font-size: 1.2rem;
  color: white;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicator.active {
  background-color: white;
  width: 30px;
  border-radius: 6px;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.carousel-control {
  width: 50px;
  height: 50px;
  background-color: rgba(0,0,0,0.3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 20px;
}

.carousel-control:hover {
  background-color: rgba(0,0,0,0.6);
  transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .carousel {
    height: 300px;
  }
  
  .carousel-caption h3 {
    font-size: 1.8rem;
  }
  
  .carousel-caption p {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 15px;
  }
}

/* 导航栏样式 */
.navbar {
  background-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.navbar-logo {
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo span {
  color: var(--accent-color);
}

/* 菜单样式 */
.menu {
  display: flex;
  gap: 5px;
}

.menu-item {
  position: relative;
}

.menu-item > a {
  display: block;
  padding: 15px 20px;
  color: white;
  font-weight: 500;
  transition: var(--transition);
}

.menu-item:hover > a {
  background-color: var(--primary-dark);
}

/* 下拉菜单 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  box-shadow: var(--shadow-md);
  min-width: 200px;
  display: none;
  z-index: 1001;
}

.menu-item:hover .submenu {
  display: block;
}

.submenu-item a {
  display: block;
  padding: 12px 20px;
  color: var(--text-primary);
  transition: var(--transition);
}

.submenu-item:hover a {
  background-color: var(--ocean-light);
  color: var(--primary-dark);
}

/* 登录注册按钮组 */
.auth-buttons {
  display: flex;
  gap: 10px;
}

.login-btn, .register-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  transition: var(--transition);
}

.login-btn {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.login-btn:hover {
  background-color: white;
  color: var(--primary-color);
}

.register-btn {
  background-color: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.register-btn:hover {
  background-color: #f57c00;
  border-color: #f57c00;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  background-color: transparent;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 移动端响应式 */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }
  
  .menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    gap: 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .menu.active {
    transform: translateY(0);
  }
  
  .submenu {
    position: relative;
    top: 0;
    background-color: var(--primary-dark);
    box-shadow: none;
    min-width: 100%;
  }
  
  .submenu-item a {
    color: white;
    padding-left: 40px;
  }
  
  .submenu-item:hover a {
    background-color: var(--ocean-dark);
    color: white;
  }
  
  .auth-buttons {
    gap: 5px;
  }
  
  .login-btn, .register-btn {
    padding: 6px 15px;
    font-size: 14px;
  }
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--ocean-light);
  color: var(--ocean-dark);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tag-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.tag-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.tag-accent {
  background-color: var(--accent-color);
  color: white;
}

/* 评分星星样式 */
.stars {
  color: #ffc107;
  font-size: 16px;
}

.stars .star {
  margin-right: 2px;
}

/* 阴影和效果 */
.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

/* 动画效果 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active, .slide-up-leave-active {
  transition: transform 0.3s ease;
}

.slide-up-enter-from {
  transform: translateY(20px);
  opacity: 0;
}

.slide-up-leave-to {
  transform: translateY(-20px);
  opacity: 0;
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--ocean-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ocean-dark);
}
